| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |