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

Side by Side Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 months 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
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 class CloseObserver : public content::WebContentsObserver { 75 class CloseObserver : public content::WebContentsObserver {
76 public: 76 public:
77 explicit CloseObserver(WebContents* contents) 77 explicit CloseObserver(WebContents* contents)
78 : content::WebContentsObserver(contents) {} 78 : content::WebContentsObserver(contents) {}
79 79
80 void Wait() { 80 void Wait() {
81 close_loop_.Run(); 81 close_loop_.Run();
82 } 82 }
83 83
84 virtual void WebContentsDestroyed(WebContents* contents) OVERRIDE { 84 virtual void WebContentsDestroyed() OVERRIDE {
85 close_loop_.Quit(); 85 close_loop_.Quit();
86 } 86 }
87 87
88 private: 88 private:
89 base::RunLoop close_loop_; 89 base::RunLoop close_loop_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(CloseObserver); 91 DISALLOW_COPY_AND_ASSIGN(CloseObserver);
92 }; 92 };
93 93
94 class PopupBlockerBrowserTest : public InProcessBrowserTest { 94 class PopupBlockerBrowserTest : public InProcessBrowserTest {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 // Verify that the renderer can't DOS the browser by creating arbitrarily many 472 // Verify that the renderer can't DOS the browser by creating arbitrarily many
473 // popups. 473 // popups.
474 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) { 474 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) {
475 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html")); 475 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html"));
476 ui_test_utils::NavigateToURL(browser(), url); 476 ui_test_utils::NavigateToURL(browser(), url);
477 ASSERT_EQ(25, GetBlockedContentsCount()); 477 ASSERT_EQ(25, GetBlockedContentsCount());
478 } 478 }
479 479
480 } // namespace 480 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698