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

Side by Side Diff: chrome/browser/tab_contents/view_source_uitest.cc

Issue 149281: Sprinkle some defensiveness into the UI tests so that they don't explode if t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/sessions/session_restore_uitest.cc ('k') | chrome/browser/tab_restore_uitest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/app/chrome_dll_resource.h" 5 #include "chrome/app/chrome_dll_resource.h"
6 #include "chrome/test/automation/browser_proxy.h" 6 #include "chrome/test/automation/browser_proxy.h"
7 #include "chrome/test/automation/tab_proxy.h" 7 #include "chrome/test/automation/tab_proxy.h"
8 #include "chrome/test/ui/ui_test.h" 8 #include "chrome/test/ui/ui_test.h"
9 #include "net/url_request/url_request_unittest.h" 9 #include "net/url_request/url_request_unittest.h"
10 10
(...skipping 28 matching lines...) Expand all
39 scoped_refptr<HTTPTestServer> server = 39 scoped_refptr<HTTPTestServer> server =
40 HTTPTestServer::CreateServer(kDocRoot, NULL); 40 HTTPTestServer::CreateServer(kDocRoot, NULL);
41 ASSERT_TRUE(NULL != server.get()); 41 ASSERT_TRUE(NULL != server.get());
42 std::string cookie = "viewsource_cookie"; 42 std::string cookie = "viewsource_cookie";
43 std::string cookie_data = "foo"; 43 std::string cookie_data = "foo";
44 44
45 // First we navigate to our view-source test page 45 // First we navigate to our view-source test page
46 GURL url = server->TestServerPageW(test_html_); 46 GURL url = server->TestServerPageW(test_html_);
47 url = GURL("view-source:" + url.spec()); 47 url = GURL("view-source:" + url.spec());
48 scoped_refptr<TabProxy> tab(GetActiveTab()); 48 scoped_refptr<TabProxy> tab(GetActiveTab());
49 ASSERT_TRUE(tab.get());
49 tab->NavigateToURL(url); 50 tab->NavigateToURL(url);
50 PlatformThread::Sleep(sleep_timeout_ms()); 51 PlatformThread::Sleep(sleep_timeout_ms());
51 52
52 // Try to retrieve the cookie that the page sets 53 // Try to retrieve the cookie that the page sets
53 // It should not be there (because we are in view-source mode 54 // It should not be there (because we are in view-source mode
54 std::string cookie_found; 55 std::string cookie_found;
55 tab->GetCookieByName(url, cookie, &cookie_found); 56 tab->GetCookieByName(url, cookie, &cookie_found);
56 EXPECT_NE(cookie_data, cookie_found); 57 EXPECT_NE(cookie_data, cookie_found);
57 } 58 }
58 59
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 // First we navigate to google.html 102 // First we navigate to google.html
102 GURL url = server->TestServerPageW(test_html_); 103 GURL url = server->TestServerPageW(test_html_);
103 GURL url_viewsource = GURL("view-source:" + url.spec()); 104 GURL url_viewsource = GURL("view-source:" + url.spec());
104 NavigateToURL(url_viewsource); 105 NavigateToURL(url_viewsource);
105 106
106 EXPECT_FALSE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE)); 107 EXPECT_FALSE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE));
107 } 108 }
108 109
109 } // namespace 110 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_uitest.cc ('k') | chrome/browser/tab_restore_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698