OLD | NEW |
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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/autoupdate_interceptor.h" | 8 #include "chrome/browser/extensions/autoupdate_interceptor.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 extension->page_action()->GetTitle(tab_id).c_str()); | 349 extension->page_action()->GetTitle(tab_id).c_str()); |
350 } | 350 } |
351 | 351 |
352 GURL GetFeedUrl(net::TestServer* server, const std::string& feed_page, | 352 GURL GetFeedUrl(net::TestServer* server, const std::string& feed_page, |
353 bool direct_url, std::string extension_id) { | 353 bool direct_url, std::string extension_id) { |
354 GURL feed_url = server->GetURL(feed_page); | 354 GURL feed_url = server->GetURL(feed_page); |
355 if (direct_url) { | 355 if (direct_url) { |
356 // We navigate directly to the subscribe page for feeds where the feed | 356 // We navigate directly to the subscribe page for feeds where the feed |
357 // sniffing won't work, in other words, as is the case for malformed feeds. | 357 // sniffing won't work, in other words, as is the case for malformed feeds. |
358 return GURL(std::string(chrome::kExtensionScheme) + | 358 return GURL(std::string(chrome::kExtensionScheme) + |
359 chrome::kStandardSchemeSeparator + | 359 content::kStandardSchemeSeparator + |
360 extension_id + std::string(kSubscribePage) + std::string("?") + | 360 extension_id + std::string(kSubscribePage) + std::string("?") + |
361 feed_url.spec() + std::string("&synchronous")); | 361 feed_url.spec() + std::string("&synchronous")); |
362 } else { | 362 } else { |
363 // Navigate to the feed content (which will cause the extension to try to | 363 // Navigate to the feed content (which will cause the extension to try to |
364 // sniff the type and display the subscribe page in another tab. | 364 // sniff the type and display the subscribe page in another tab. |
365 return GURL(feed_url.spec()); | 365 return GURL(feed_url.spec()); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 static const wchar_t* jscript_feed_title = | 369 static const wchar_t* jscript_feed_title = |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 | 926 |
927 EXPECT_EQ(extension->GetResourceURL("options.html"), | 927 EXPECT_EQ(extension->GetResourceURL("options.html"), |
928 tab_strip->GetTabContentsAt(1)->web_contents()->GetURL()); | 928 tab_strip->GetTabContentsAt(1)->web_contents()->GetURL()); |
929 } | 929 } |
930 | 930 |
931 //============================================================================== | 931 //============================================================================== |
932 // STOP! Please do not add any more random-ass tests here. Create new files for | 932 // STOP! Please do not add any more random-ass tests here. Create new files for |
933 // your tests grouped by functionality. Also, you should strongly consider using | 933 // your tests grouped by functionality. Also, you should strongly consider using |
934 // ExtensionAPITest if possible. | 934 // ExtensionAPITest if possible. |
935 //============================================================================== | 935 //============================================================================== |
OLD | NEW |