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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/settings/settings_frontend.h" | 10 #include "chrome/browser/extensions/settings/settings_frontend.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 std::string CreateMessage( | 124 std::string CreateMessage( |
125 Namespace settings_namespace, | 125 Namespace settings_namespace, |
126 const std::string& action, | 126 const std::string& action, |
127 bool is_final_action) { | 127 bool is_final_action) { |
128 scoped_ptr<DictionaryValue> message(new DictionaryValue()); | 128 scoped_ptr<DictionaryValue> message(new DictionaryValue()); |
129 message->SetString("namespace", ToString(settings_namespace)); | 129 message->SetString("namespace", ToString(settings_namespace)); |
130 message->SetString("action", action); | 130 message->SetString("action", action); |
131 message->SetBoolean("isFinalAction", is_final_action); | 131 message->SetBoolean("isFinalAction", is_final_action); |
132 std::string message_json; | 132 std::string message_json; |
133 base::JSONWriter::Write(message.get(), false, &message_json); | 133 base::JSONWriter::Write(message.get(), &message_json); |
134 return message_json; | 134 return message_json; |
135 } | 135 } |
136 | 136 |
137 void InitSyncWithSyncableService( | 137 void InitSyncWithSyncableService( |
138 SyncChangeProcessor* sync_processor, SyncableService* settings_service) { | 138 SyncChangeProcessor* sync_processor, SyncableService* settings_service) { |
139 EXPECT_FALSE(settings_service->MergeDataAndStartSyncing( | 139 EXPECT_FALSE(settings_service->MergeDataAndStartSyncing( |
140 kModelType, | 140 kModelType, |
141 SyncDataList(), | 141 SyncDataList(), |
142 sync_processor).IsSet()); | 142 sync_processor).IsSet()); |
143 } | 143 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 SendChanges(sync_changes); | 349 SendChanges(sync_changes); |
350 | 350 |
351 FinalReplyWhenSatisfied(LOCAL, | 351 FinalReplyWhenSatisfied(LOCAL, |
352 "assertNoNotifications", "assertNoNotifications"); | 352 "assertNoNotifications", "assertNoNotifications"); |
353 | 353 |
354 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 354 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
355 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message(); | 355 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message(); |
356 } | 356 } |
357 | 357 |
358 } // namespace extensions | 358 } // namespace extensions |
OLD | NEW |