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

Side by Side Diff: chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc

Issue 16058002: Better workaround for extension browser test problems on win debug bots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid leaving orphan temp directories Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_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 "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_ api.h" 5 #include "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_ api.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 MATCHER(IsExpectedUserSettings, "") { 78 MATCHER(IsExpectedUserSettings, "") {
79 const UserSettings& settings = arg; 79 const UserSettings& settings = arg;
80 return settings.connect_new_printers && 80 return settings.connect_new_printers &&
81 settings.printers.size() == 2 && 81 settings.printers.size() == 2 &&
82 settings.printers[0]->name == "printer1" && 82 settings.printers[0]->name == "printer1" &&
83 !settings.printers[0]->connect && 83 !settings.printers[0]->connect &&
84 settings.printers[1]->name == "printer2" && 84 settings.printers[1]->name == "printer2" &&
85 settings.printers[1]->connect; 85 settings.printers[1]->connect;
86 } 86 }
87 87
88 IN_PROC_BROWSER_TEST_F(ExtensionCloudPrintPrivateApiTest, CloudPrintHosted) { 88 // http://crbug.com/177163
89 #if defined(OS_WIN) && !defined(NDEBUG)
90 #define MAYBE_CloudPrintHosted DISABLED_CloudPrintHosted
91 #else
92 #define MAYBE_CloudPrintHosted CloudPrintHosted
93 #endif
94 IN_PROC_BROWSER_TEST_F(ExtensionCloudPrintPrivateApiTest,
95 MAYBE_CloudPrintHosted) {
89 CloudPrintTestsDelegateMock cloud_print_mock; 96 CloudPrintTestsDelegateMock cloud_print_mock;
90 97
91 EXPECT_CALL(cloud_print_mock, 98 EXPECT_CALL(cloud_print_mock,
92 SetupConnector("foo@gmail.com", 99 SetupConnector("foo@gmail.com",
93 "foorobot@googleusercontent.com", 100 "foorobot@googleusercontent.com",
94 "1/23546efa54", 101 "1/23546efa54",
95 IsExpectedUserSettings())); 102 IsExpectedUserSettings()));
96 EXPECT_CALL(cloud_print_mock, GetHostName()) 103 EXPECT_CALL(cloud_print_mock, GetHostName())
97 .WillRepeatedly(Return("TestHostName")); 104 .WillRepeatedly(Return("TestHostName"));
98 105
99 std::vector<std::string> printers; 106 std::vector<std::string> printers;
100 printers.push_back("printer1"); 107 printers.push_back("printer1");
101 printers.push_back("printer2"); 108 printers.push_back("printer2");
102 EXPECT_CALL(cloud_print_mock, GetPrinters()) 109 EXPECT_CALL(cloud_print_mock, GetPrinters())
103 .WillRepeatedly(Return(printers)); 110 .WillRepeatedly(Return(printers));
104 111
105 EXPECT_CALL(cloud_print_mock, GetClientId()) 112 EXPECT_CALL(cloud_print_mock, GetClientId())
106 .WillRepeatedly(Return("TestAPIClient")); 113 .WillRepeatedly(Return("TestAPIClient"));
107 114
108 // Run this as a hosted app. Since we have overridden the cloud print service 115 // Run this as a hosted app. Since we have overridden the cloud print service
109 // URL in the command line, this URL should match the web extent for our 116 // URL in the command line, this URL should match the web extent for our
110 // cloud print component app and it should work. 117 // cloud print component app and it should work.
111 GURL page_url = GetTestServerURL( 118 GURL page_url = GetTestServerURL(
112 "enable_chrome_connector/cloud_print_success_tests.html"); 119 "enable_chrome_connector/cloud_print_success_tests.html");
113 ASSERT_TRUE(RunPageTest(page_url.spec())); 120 ASSERT_TRUE(RunPageTest(page_url.spec()));
114 } 121 }
115 122
116 #endif // !defined(OS_CHROMEOS) 123 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698