| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <Cocoa/Cocoa.h> |
| 6 |
| 7 #import "base/nsimage_cache_mac.h" |
| 8 #import "chrome/browser/cocoa/animatable_image.h" |
| 9 #import "chrome/browser/cocoa/cocoa_test_helper.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "testing/platform_test.h" |
| 12 |
| 13 namespace { |
| 14 |
| 15 class AnimatableImageTest : public CocoaTest { |
| 16 public: |
| 17 AnimatableImageTest() { |
| 18 NSRect frame = NSMakeRect(0, 0, 500, 500); |
| 19 NSImage* image = nsimage_cache::ImageNamed(@"forward_Template.pdf"); |
| 20 animation_ = [[AnimatableImage alloc] initWithImage:image |
| 21 animationFrame:frame]; |
| 22 } |
| 23 |
| 24 AnimatableImage* animation_; |
| 25 }; |
| 26 |
| 27 TEST_F(AnimatableImageTest, BasicAnimation) { |
| 28 [animation_ setStartFrame:CGRectMake(0, 0, 10, 10)]; |
| 29 [animation_ setEndFrame:CGRectMake(500, 500, 100, 100)]; |
| 30 [animation_ setStartOpacity:0.1]; |
| 31 [animation_ setEndOpacity:1.0]; |
| 32 [animation_ setDuration:0.5]; |
| 33 [animation_ startAnimation]; |
| 34 } |
| 35 |
| 36 } // namespace |
| OLD | NEW |