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

Side by Side Diff: chrome/browser/collected_cookies_browsertest.cc

Issue 25238003: Will now DCHECK that test writers start the embedded server before using it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing tests which did not init embedded test server Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/lazy_background_page_apitest.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 (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 <string> 5 #include <string>
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/content_settings/cookie_settings.h" 8 #include "chrome/browser/content_settings/cookie_settings.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Click on the info link twice. 32 // Click on the info link twice.
33 content::WebContents* web_contents = 33 content::WebContents* web_contents =
34 browser()->tab_strip_model()->GetActiveWebContents(); 34 browser()->tab_strip_model()->GetActiveWebContents();
35 chrome::ShowCollectedCookiesDialog(web_contents); 35 chrome::ShowCollectedCookiesDialog(web_contents);
36 chrome::ShowCollectedCookiesDialog(web_contents); 36 chrome::ShowCollectedCookiesDialog(web_contents);
37 } 37 }
38 38
39 // If this crashes on Windows, use http://crbug.com/79331 39 // If this crashes on Windows, use http://crbug.com/79331
40 IN_PROC_BROWSER_TEST_F(CollectedCookiesTest, NavigateAway) { 40 IN_PROC_BROWSER_TEST_F(CollectedCookiesTest, NavigateAway) {
41 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
41 42
42 // Disable cookies. 43 // Disable cookies.
43 CookieSettings::Factory::GetForProfile(browser()->profile())-> 44 CookieSettings::Factory::GetForProfile(browser()->profile())->
44 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK); 45 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
45 46
46 // Load a page with cookies. 47 // Load a page with cookies.
47 ui_test_utils::NavigateToURL( 48 ui_test_utils::NavigateToURL(
48 browser(), embedded_test_server()->GetURL("/cookie1.html")); 49 browser(), embedded_test_server()->GetURL("/cookie1.html"));
49 50
50 // Click on the info link. 51 // Click on the info link.
51 content::WebContents* web_contents = 52 content::WebContents* web_contents =
52 browser()->tab_strip_model()->GetActiveWebContents(); 53 browser()->tab_strip_model()->GetActiveWebContents();
53 chrome::ShowCollectedCookiesDialog(web_contents); 54 chrome::ShowCollectedCookiesDialog(web_contents);
54 55
55 // Navigate to another page. 56 // Navigate to another page.
56 ui_test_utils::NavigateToURL( 57 ui_test_utils::NavigateToURL(
57 browser(), embedded_test_server()->GetURL("/cookie2.html")); 58 browser(), embedded_test_server()->GetURL("/cookie2.html"));
58 } 59 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/lazy_background_page_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698