| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2549 "console.log(239))}\"" | 2549 "console.log(239))}\"" |
| 2550 "}" | 2550 "}" |
| 2551 "}"); | 2551 "}"); |
| 2552 EXPECT_EQ(1, CountNotifications("Runtime.consoleAPICalled")); | 2552 EXPECT_EQ(1, CountNotifications("Runtime.consoleAPICalled")); |
| 2553 } | 2553 } |
| 2554 | 2554 |
| 2555 TEST_F(DevToolsAgentTest, CallFramesInIsolatedWorld) { | 2555 TEST_F(DevToolsAgentTest, CallFramesInIsolatedWorld) { |
| 2556 LoadHTML("<body>page</body>"); | 2556 LoadHTML("<body>page</body>"); |
| 2557 blink::WebScriptSource source1( | 2557 blink::WebScriptSource source1( |
| 2558 WebString::fromUTF8("function func1() { debugger; }")); | 2558 WebString::fromUTF8("function func1() { debugger; }")); |
| 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source1, 1, 1); | 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source1, 1); |
| 2560 | 2560 |
| 2561 Attach(); | 2561 Attach(); |
| 2562 DispatchDevToolsMessage("Debugger.enable", | 2562 DispatchDevToolsMessage("Debugger.enable", |
| 2563 "{\"id\":1,\"method\":\"Debugger.enable\"}"); | 2563 "{\"id\":1,\"method\":\"Debugger.enable\"}"); |
| 2564 | 2564 |
| 2565 ExpectPauseAndResume(3); | 2565 ExpectPauseAndResume(3); |
| 2566 blink::WebScriptSource source2( | 2566 blink::WebScriptSource source2( |
| 2567 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2567 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2568 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2568 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1); |
| 2569 | 2569 |
| 2570 EXPECT_FALSE(IsPaused()); | 2570 EXPECT_FALSE(IsPaused()); |
| 2571 Detach(); | 2571 Detach(); |
| 2572 } | 2572 } |
| 2573 | 2573 |
| 2574 } // namespace content | 2574 } // namespace content |
| OLD | NEW |