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

Side by Side Diff: chrome/browser/extensions/isolated_app_browsertest.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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
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 "base/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 24 matching lines...) Expand all
35 namespace { 35 namespace {
36 36
37 std::string WrapForJavascriptAndExtract(const char* javascript_expression) { 37 std::string WrapForJavascriptAndExtract(const char* javascript_expression) {
38 return std::string("window.domAutomationController.send(") + 38 return std::string("window.domAutomationController.send(") +
39 javascript_expression + ")"; 39 javascript_expression + ")";
40 } 40 }
41 41
42 scoped_ptr<net::test_server::HttpResponse> HandleExpectAndSetCookieRequest( 42 scoped_ptr<net::test_server::HttpResponse> HandleExpectAndSetCookieRequest(
43 const net::test_server::EmbeddedTestServer* test_server, 43 const net::test_server::EmbeddedTestServer* test_server,
44 const net::test_server::HttpRequest& request) { 44 const net::test_server::HttpRequest& request) {
45 if (!base::StartsWithASCII(request.relative_url, "/expect-and-set-cookie?", 45 if (!base::StartsWith(request.relative_url, "/expect-and-set-cookie?",
46 true)) 46 base::CompareCase::SENSITIVE))
47 return scoped_ptr<net::test_server::HttpResponse>(); 47 return scoped_ptr<net::test_server::HttpResponse>();
48 48
49 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 49 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
50 new net::test_server::BasicHttpResponse); 50 new net::test_server::BasicHttpResponse);
51 http_response->set_code(net::HTTP_OK); 51 http_response->set_code(net::HTTP_OK);
52 52
53 std::string request_cookies; 53 std::string request_cookies;
54 std::map<std::string, std::string>::const_iterator it = 54 std::map<std::string, std::string>::const_iterator it =
55 request.headers.find("Cookie"); 55 request.headers.find("Cookie");
56 if (it != request.headers.end()) 56 if (it != request.headers.end())
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 browser(), base_url.Resolve("non_app/main.html")); 558 browser(), base_url.Resolve("non_app/main.html"));
559 ASSERT_TRUE(ExecuteScriptAndExtractString( 559 ASSERT_TRUE(ExecuteScriptAndExtractString(
560 browser()->tab_strip_model()->GetWebContentsAt(0), 560 browser()->tab_strip_model()->GetWebContentsAt(0),
561 kRetrieveSessionStorage.c_str(), &result)); 561 kRetrieveSessionStorage.c_str(), &result));
562 EXPECT_EQ("ss_normal", result); 562 EXPECT_EQ("ss_normal", result);
563 } 563 }
564 564
565 } // namespace 565 } // namespace
566 566
567 } // namespace extensions 567 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698