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

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

Issue 63113: Convert Windows Sleep to PlatformThread::Sleep... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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
11 namespace { 11 namespace {
(...skipping 30 matching lines...) Expand all
42 HTTPTestServer::CreateServer(kDocRoot, NULL); 42 HTTPTestServer::CreateServer(kDocRoot, NULL);
43 ASSERT_TRUE(NULL != server.get()); 43 ASSERT_TRUE(NULL != server.get());
44 std::string cookie = "viewsource_cookie"; 44 std::string cookie = "viewsource_cookie";
45 std::string cookie_data = "foo"; 45 std::string cookie_data = "foo";
46 46
47 // First we navigate to our view-source test page 47 // First we navigate to our view-source test page
48 GURL url = server->TestServerPageW(test_html_); 48 GURL url = server->TestServerPageW(test_html_);
49 url = GURL("view-source:" + url.spec()); 49 url = GURL("view-source:" + url.spec());
50 scoped_ptr<TabProxy> tab(GetActiveTab()); 50 scoped_ptr<TabProxy> tab(GetActiveTab());
51 tab->NavigateToURL(url); 51 tab->NavigateToURL(url);
52 Sleep(sleep_timeout_ms()); 52 PlatformThread::Sleep(sleep_timeout_ms());
53 53
54 // Try to retrieve the cookie that the page sets 54 // Try to retrieve the cookie that the page sets
55 // It should not be there (because we are in view-source mode 55 // It should not be there (because we are in view-source mode
56 std::string cookie_found; 56 std::string cookie_found;
57 tab->GetCookieByName(url, cookie, &cookie_found); 57 tab->GetCookieByName(url, cookie, &cookie_found);
58 EXPECT_NE(cookie_data, cookie_found); 58 EXPECT_NE(cookie_data, cookie_found);
59 } 59 }
60 60
61 // This test renders a page normally and then renders the same page in 61 // This test renders a page normally and then renders the same page in
62 // view-source mode. This is done since we had a problem at one point during 62 // view-source mode. This is done since we had a problem at one point during
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 HTTPTestServer::CreateServer(kDocRoot, NULL); 100 HTTPTestServer::CreateServer(kDocRoot, NULL);
101 ASSERT_TRUE(NULL != server.get()); 101 ASSERT_TRUE(NULL != server.get());
102 102
103 // First we navigate to google.html 103 // First we navigate to google.html
104 GURL url = server->TestServerPageW(test_html_); 104 GURL url = server->TestServerPageW(test_html_);
105 GURL url_viewsource = GURL("view-source:" + url.spec()); 105 GURL url_viewsource = GURL("view-source:" + url.spec());
106 NavigateToURL(url_viewsource); 106 NavigateToURL(url_viewsource);
107 107
108 EXPECT_FALSE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE)); 108 EXPECT_FALSE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE));
109 } 109 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc ('k') | chrome/browser/unload_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698