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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_action_unittest.cc

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 1 month 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 "extensions/browser/api/declarative_webrequest/webrequest_action.h" 5 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 " \"instanceType\": \"declarativeWebRequest.RedirectToTransparentImage\"" 551 " \"instanceType\": \"declarativeWebRequest.RedirectToTransparentImage\""
552 "}," 552 "},"
553 "{" 553 "{"
554 " \"instanceType\": \"declarativeWebRequest.RedirectToEmptyDocument\"" 554 " \"instanceType\": \"declarativeWebRequest.RedirectToEmptyDocument\""
555 "}," 555 "},"
556 "{" 556 "{"
557 " \"instanceType\": \"declarativeWebRequest.IgnoreRules\"," 557 " \"instanceType\": \"declarativeWebRequest.IgnoreRules\","
558 " \"lowerPriorityThan\": 123," 558 " \"lowerPriorityThan\": 123,"
559 " \"hasTag\": \"some_tag\"" 559 " \"hasTag\": \"some_tag\""
560 "}]"; 560 "}]";
561 const char* kExpectedNames[] = { 561 const char* const kExpectedNames[] = {
562 "declarativeWebRequest.RedirectRequest", 562 "declarativeWebRequest.RedirectRequest",
563 "declarativeWebRequest.RedirectByRegEx", 563 "declarativeWebRequest.RedirectByRegEx",
564 "declarativeWebRequest.SetRequestHeader", 564 "declarativeWebRequest.SetRequestHeader",
565 "declarativeWebRequest.RemoveRequestHeader", 565 "declarativeWebRequest.RemoveRequestHeader",
566 "declarativeWebRequest.AddResponseHeader", 566 "declarativeWebRequest.AddResponseHeader",
567 "declarativeWebRequest.RemoveResponseHeader", 567 "declarativeWebRequest.RemoveResponseHeader",
568 "declarativeWebRequest.SendMessageToExtension", 568 "declarativeWebRequest.SendMessageToExtension",
569 "declarativeWebRequest.AddRequestCookie", 569 "declarativeWebRequest.AddRequestCookie",
570 "declarativeWebRequest.AddResponseCookie", 570 "declarativeWebRequest.AddResponseCookie",
571 "declarativeWebRequest.EditRequestCookie", 571 "declarativeWebRequest.EditRequestCookie",
(...skipping 11 matching lines...) Expand all
583 for (WebRequestActionSet::Actions::const_iterator it = 583 for (WebRequestActionSet::Actions::const_iterator it =
584 action_set->actions().begin(); 584 action_set->actions().begin();
585 it != action_set->actions().end(); 585 it != action_set->actions().end();
586 ++it) { 586 ++it) {
587 EXPECT_EQ(kExpectedNames[index], (*it)->GetName()); 587 EXPECT_EQ(kExpectedNames[index], (*it)->GetName());
588 ++index; 588 ++index;
589 } 589 }
590 } 590 }
591 591
592 } // namespace extensions 592 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698