Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: content/browser/devtools/protocol/devtools_protocol_browsertest.cc

Issue 1419093004: [DevTools] Fix crash in Page.reload when there is no visible entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698