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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 std::string error; | 60 std::string error; |
61 bool bad_message = false; | 61 bool bad_message = false; |
62 | 62 |
63 scoped_ptr<WebRequestActionSet> action_set( | 63 scoped_ptr<WebRequestActionSet> action_set( |
64 WebRequestActionSet::Create(NULL, NULL, actions, &error, &bad_message)); | 64 WebRequestActionSet::Create(NULL, NULL, actions, &error, &bad_message)); |
65 EXPECT_EQ("", error); | 65 EXPECT_EQ("", error); |
66 EXPECT_FALSE(bad_message); | 66 EXPECT_FALSE(bad_message); |
67 CHECK(action_set); | 67 CHECK(action_set); |
68 return action_set.Pass(); | 68 return action_set; |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 namespace keys = declarative_webrequest_constants; | 73 namespace keys = declarative_webrequest_constants; |
74 | 74 |
75 class WebRequestActionWithThreadsTest : public testing::Test { | 75 class WebRequestActionWithThreadsTest : public testing::Test { |
76 public: | 76 public: |
77 WebRequestActionWithThreadsTest() | 77 WebRequestActionWithThreadsTest() |
78 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {} | 78 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {} |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 for (WebRequestActionSet::Actions::const_iterator it = | 586 for (WebRequestActionSet::Actions::const_iterator it = |
587 action_set->actions().begin(); | 587 action_set->actions().begin(); |
588 it != action_set->actions().end(); | 588 it != action_set->actions().end(); |
589 ++it) { | 589 ++it) { |
590 EXPECT_EQ(kExpectedNames[index], (*it)->GetName()); | 590 EXPECT_EQ(kExpectedNames[index], (*it)->GetName()); |
591 ++index; | 591 ++index; |
592 } | 592 } |
593 } | 593 } |
594 | 594 |
595 } // namespace extensions | 595 } // namespace extensions |
OLD | NEW |