OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/live_sync/live_bookmarks_sync_test.h" | 5 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" |
6 | 6 |
7 #include "base/stringprintf.h" | |
7 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/test/ui_test_utils.h" | 10 #include "chrome/test/ui_test_utils.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "ui/gfx/codec/png_codec.h" | 12 #include "ui/gfx/codec/png_codec.h" |
12 | 13 |
13 LiveBookmarksSyncTest::LiveBookmarksSyncTest(TestType test_type) | 14 LiveBookmarksSyncTest::LiveBookmarksSyncTest(TestType test_type) |
14 : LiveSyncTest(test_type) {} | 15 : LiveSyncTest(test_type) {} |
15 | 16 |
16 LiveBookmarksSyncTest::~LiveBookmarksSyncTest() {} | 17 LiveBookmarksSyncTest::~LiveBookmarksSyncTest() {} |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 for (int i = 0; i < w * h; ++i) { | 257 for (int i = 0; i < w * h; ++i) { |
257 src_data[i] = SkPreMultiplyARGB((seed + i) % 255, | 258 src_data[i] = SkPreMultiplyARGB((seed + i) % 255, |
258 (seed + i) % 250, | 259 (seed + i) % 250, |
259 (seed + i) % 245, | 260 (seed + i) % 245, |
260 (seed + i) % 240); | 261 (seed + i) % 240); |
261 } | 262 } |
262 std::vector<unsigned char> favicon; | 263 std::vector<unsigned char> favicon; |
263 gfx::PNGCodec::EncodeBGRASkBitmap(bmp, false, &favicon); | 264 gfx::PNGCodec::EncodeBGRASkBitmap(bmp, false, &favicon); |
264 return favicon; | 265 return favicon; |
265 } | 266 } |
267 | |
268 std::string LiveBookmarksSyncTest::IndexedURL(int i) { | |
269 return StringPrintf("http://www.host.ext:1234/path/filename/%d", i); | |
Raghu Simha
2011/06/15 18:38:16
indent -= 2.
braffert
2011/06/16 00:59:24
All 5 fixed.
| |
270 } | |
271 | |
272 std::wstring LiveBookmarksSyncTest::IndexedURLTitle(int i) { | |
273 return StringPrintf(L"URL Title %d", i); | |
Raghu Simha
2011/06/15 18:38:16
indent -= 2.
| |
274 } | |
275 | |
276 std::wstring LiveBookmarksSyncTest::IndexedFolderName(int i) { | |
277 return StringPrintf(L"Folder Name %d", i); | |
Raghu Simha
2011/06/15 18:38:16
indent -= 2.
| |
278 } | |
279 | |
280 std::wstring LiveBookmarksSyncTest::IndexedSubfolderName(int i) { | |
281 return StringPrintf(L"Subfolder Name %d", i); | |
Raghu Simha
2011/06/15 18:38:16
indent -= 2.
| |
282 } | |
283 | |
284 std::wstring LiveBookmarksSyncTest::IndexedSubsubfolderName(int i) { | |
285 return StringPrintf(L"Subsubfolder Name %d", i); | |
Raghu Simha
2011/06/15 18:38:16
indent -= 2.
| |
286 } | |
287 | |
Raghu Simha
2011/06/15 18:38:16
Delete extra blank line.
braffert
2011/06/16 00:59:24
Done.
| |
OLD | NEW |