| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/ui/cocoa/applescript/apple_event_util.h" | 5 #import "chrome/browser/ui/cocoa/applescript/apple_event_util.h" |
| 6 | 6 |
| 7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 EXPECT_EQ(cases[i].expected_aedesc_type, | 246 EXPECT_EQ(cases[i].expected_aedesc_type, |
| 247 [descriptor descriptorType]) << "i: " << i; | 247 [descriptor descriptorType]) << "i: " << i; |
| 248 } | 248 } |
| 249 | 249 |
| 250 // Test boolean values separately because boolean NSAppleEventDescriptors | 250 // Test boolean values separately because boolean NSAppleEventDescriptors |
| 251 // return different values across different system versions when their | 251 // return different values across different system versions when their |
| 252 // -description method is called. | 252 // -description method is called. |
| 253 | 253 |
| 254 const bool all_bools[] = { true, false }; | 254 const bool all_bools[] = { true, false }; |
| 255 for (bool b : all_bools) { | 255 for (bool b : all_bools) { |
| 256 base::FundamentalValue value(b); | 256 base::Value value(b); |
| 257 NSAppleEventDescriptor* descriptor = | 257 NSAppleEventDescriptor* descriptor = |
| 258 chrome::mac::ValueToAppleEventDescriptor(&value); | 258 chrome::mac::ValueToAppleEventDescriptor(&value); |
| 259 | 259 |
| 260 EXPECT_EQ(typeBoolean, [descriptor descriptorType]); | 260 EXPECT_EQ(typeBoolean, [descriptor descriptorType]); |
| 261 EXPECT_EQ(b, [descriptor booleanValue]); | 261 EXPECT_EQ(b, [descriptor booleanValue]); |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace | 265 } // namespace |
| OLD | NEW |