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

Side by Side Diff: chrome/browser/ui/cocoa/animatable_image_unittest.mm

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 years 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) 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/animatable_image.h" 7 #import "chrome/browser/ui/cocoa/animatable_image.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
11 11
12 namespace { 12 namespace {
13 13
14 class AnimatableImageTest : public CocoaTest { 14 class AnimatableImageTest : public CocoaTest {
15 public: 15 public:
16 AnimatableImageTest() { 16 AnimatableImageTest() {
17 NSRect frame = NSMakeRect(0, 0, 500, 500); 17 NSRect frame = NSMakeRect(0, 0, 500, 500);
18 NSImage* image = [NSImage imageNamed:NSImageNameComputer]; 18 NSImage* image = [NSImage imageNamed:NSImageNameComputer];
(...skipping 17 matching lines...) Expand all
36 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)]; 36 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)];
37 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)]; 37 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)];
38 [animation_ setStartOpacity:0.1]; 38 [animation_ setStartOpacity:0.1];
39 [animation_ setEndOpacity:1.0]; 39 [animation_ setEndOpacity:1.0];
40 [animation_ setDuration:5.0]; // Long enough to be able to test cancelling. 40 [animation_ setDuration:5.0]; // Long enough to be able to test cancelling.
41 [animation_ startAnimation]; 41 [animation_ startAnimation];
42 [animation_ close]; 42 [animation_ close];
43 } 43 }
44 44
45 } // namespace 45 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/cocoa/animatable_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698