Changeset 65606 in webkit


Ignore:
Timestamp:
Aug 18, 2010 6:27:26 AM (14 years ago)
Author:
yurys@chromium.org
Message:

2010-08-18 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: inspector tests should be frontend-driven

  • http/tests/inspector/inspector-test2.js: Added. (initializeInspectorTest): (initializeInspectorTest.): (): (completeTest): (dumpArray): (dumpObject): (output): (didEvaluateForTestInFrontend):
  • inspector/debugger-breakpoints-not-activated-on-reload-expected.txt:
  • inspector/debugger-breakpoints-not-activated-on-reload.html:
Location:
trunk/LayoutTests
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r65602 r65606  
     12010-08-18  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: inspector tests should be frontend-driven
     6
     7        * http/tests/inspector/inspector-test2.js: Added.
     8        (initializeInspectorTest):
     9        (initializeInspectorTest.):
     10        ():
     11        (completeTest):
     12        (dumpArray):
     13        (dumpObject):
     14        (output):
     15        (didEvaluateForTestInFrontend):
     16        * inspector/debugger-breakpoints-not-activated-on-reload-expected.txt:
     17        * inspector/debugger-breakpoints-not-activated-on-reload.html:
     18
    1192010-08-18  Yuta Kitamura  <yutak@chromium.org>
    220
  • trunk/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload-expected.txt

    r64133 r65606  
    22
    33Debugger was enabled.
    4 Scripts were parsed.
    5 Breakpoints deactivated.
    6 Disabled debugger.
     4Main resource was shown.
     5Page reloaded.
     6Main resource was shown.
     7Breakpoints are deactivated.
     8Debugger was disabled.
    79
  • trunk/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html

    r64973 r65606  
    11<html>
    22<head>
    3 <script src="../http/tests/inspector/inspector-test.js"></script>
    4 <script src="../http/tests/inspector/debugger-test.js"></script>
     3<script src="../http/tests/inspector/inspector-test2.js"></script>
    54<script>
    65
     
    109}
    1110
    12 function doit()
    13 {
    14     evaluateInWebInspector("frontend_testBreakpointsNotActivatedOnReload", completeTest);
    15 }
    16 
    17 function frontend_testBreakpointsNotActivatedOnReload(testController)
     11var test = function()
    1812{
    1913    var testName = WebInspector.mainResource.url;
    2014    testName = testName.substring(testName.lastIndexOf('/') + 1);
    2115
    22     testController.waitUntilDone();
     16    WebInspector.showPanel("scripts");
     17    InspectorTest.ensureDebuggerEnabled(ensureDebuggerEnabledCallback);
    2318
    24     WebInspector.showPanel("scripts");
    25     frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback);
    26 
    27     function debuggerWasEnabledCallback()
     19    function ensureDebuggerEnabledCallback()
    2820    {
    29         testController.results.push("Debugger was enabled.");
    30         frontend_waitUntilScriptsAreParsed([testName], waitUntilScriptsAreParsedCallback);
    31     }
    32 
    33     function waitUntilScriptsAreParsedCallback()
    34     {
    35         testController.results.push("Scripts were parsed.");
    36         frontend_showScriptSource(testName, showScriptSourceCallback);
     21        InspectorTest.addResult("Debugger was enabled.");
     22        InspectorTest.showScriptSource(testName, showScriptSourceCallback);
    3723    }
    3824
    3925    function showScriptSourceCallback(view)
    4026    {
    41         if (!WebInspector.testBreakpointsNotActivatedOnReloadFlag) {
    42             view._addBreakpoint(8);
    43             WebInspector.panels.scripts.toggleBreakpointsButton.element.click();
    44             InspectorBackend.reloadPage();
    45             WebInspector.testBreakpointsNotActivatedOnReloadFlag = true;
    46         } else {
    47             if (!WebInspector.panels.scripts.breakpointsActivated)
    48                 testController.results.push("Breakpoints deactivated.");
    49             else
    50                 testController.results.push("Error: breakpoints activated.");
    51             frontend_completeDebuggerTest(testController);
    52         }
     27        InspectorTest.addResult("Main resource was shown.");
     28        view._addBreakpoint(8);
     29        WebInspector.panels.scripts.toggleBreakpointsButton.element.click();
     30        InspectorTest.reloadPage(reloadPageCallback);
    5331    }
    54 }
     32
     33    function reloadPageCallback()
     34    {
     35        InspectorTest.addResult("Page reloaded.");
     36        InspectorTest.showScriptSource(testName, showScriptSourceAfterReloadCallback);
     37    }
     38
     39    function showScriptSourceAfterReloadCallback(view)
     40    {
     41        InspectorTest.addResult("Main resource was shown.");
     42        if (!WebInspector.panels.scripts.breakpointsActivated)
     43            InspectorTest.addResult("Breakpoints are deactivated.");
     44        else
     45            InspectorTest.addResult("Error: breakpoints are activated.");
     46        InspectorTest.ensureDebuggerDisabled(ensureDebuggerDisabledCallback);
     47    }
     48
     49    function ensureDebuggerDisabledCallback()
     50    {
     51        InspectorTest.addResult("Debugger was disabled.");
     52        InspectorTest.completeTest();
     53    }
     54};
    5555
    5656</script>
    5757</head>
    5858
    59 <body onload="onload()">
     59<body onload="runTest()">
    6060<p>
    6161Tests that breakpoints are not activated on page reload.<a href="https://bugs.webkit.org/show_bug.cgi?id=41461">Bug 41461</a>
    6262</p>
    63 
    6463</body>
    6564</html>
    66 
    67 
Note: See TracChangeset for help on using the changeset viewer.