| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/base64.h" | 5 #include "base/base64.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "content/public/browser/devtools_agent_host.h" | 10 #include "content/public/browser/devtools_agent_host.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 // Ensure that the A.com process is still alive by executing a script in the | 463 // Ensure that the A.com process is still alive by executing a script in the |
| 464 // original tab. | 464 // original tab. |
| 465 success = false; | 465 success = false; |
| 466 EXPECT_TRUE(ExecuteScriptAndExtractBool(shell()->web_contents(), | 466 EXPECT_TRUE(ExecuteScriptAndExtractBool(shell()->web_contents(), |
| 467 "window.domAutomationController.send(" | 467 "window.domAutomationController.send(" |
| 468 " !!window.open('', 'foo'));", | 468 " !!window.open('', 'foo'));", |
| 469 &success)); | 469 &success)); |
| 470 EXPECT_TRUE(success); | 470 EXPECT_TRUE(success); |
| 471 } | 471 } |
| 472 | 472 |
| 473 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, ReloadBlankPage) { |
| 474 Shell* window = Shell::CreateNewWindow( |
| 475 shell()->web_contents()->GetBrowserContext(), |
| 476 GURL("javascript:x=1"), |
| 477 nullptr, |
| 478 gfx::Size()); |
| 479 WaitForLoadStop(window->web_contents()); |
| 480 Attach(); |
| 481 SendCommand("Page.reload", nullptr, false); |
| 482 // Should not crash at this point. |
| 483 } |
| 484 |
| 473 } // namespace content | 485 } // namespace content |
| OLD | NEW |