browser/devtools/webconsole/test/browser_webconsole_console_trace_duplicates.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/webconsole/test/browser_webconsole_console_trace_duplicates.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +function test() {
     1.9 +  const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug_939783_console_trace_duplicates.html";
    1.10 +
    1.11 +  Task.spawn(runner).then(finishTest);
    1.12 +
    1.13 +  function* runner() {
    1.14 +    const {tab} = yield loadTab("data:text/html;charset=utf8,<p>hello");
    1.15 +    const hud = yield openConsole(tab);
    1.16 +
    1.17 +    content.location = TEST_URI;
    1.18 +
    1.19 +    yield waitForMessages({
    1.20 +      webconsole: hud,
    1.21 +      messages: [{
    1.22 +        name: "console.trace output for foo1()",
    1.23 +        text: "foo1()",
    1.24 +        repeats: 2,
    1.25 +        consoleTrace: {
    1.26 +          file: "test-bug_939783_console_trace_duplicates.html",
    1.27 +          fn: "foo3()",
    1.28 +        },
    1.29 +      }, {
    1.30 +        name: "console.trace output for foo1b()",
    1.31 +        text: "foo1b()",
    1.32 +        consoleTrace: {
    1.33 +          file: "test-bug_939783_console_trace_duplicates.html",
    1.34 +          fn: "foo3()",
    1.35 +        },
    1.36 +      }],
    1.37 +    });
    1.38 +  }
    1.39 +}

mercurial