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 |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/mac/scoped_aedesc.h" | 14 #include "base/mac/scoped_aedesc.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/stringprintf.h" | |
18 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
19 #include "base/values.h" | 18 #include "base/values.h" |
20 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 19 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
21 #include "testing/gtest_mac.h" | 20 #include "testing/gtest_mac.h" |
22 | 21 |
23 namespace { | 22 namespace { |
24 | 23 |
25 std::string FourCharToString(FourCharCode code) { | 24 std::string FourCharToString(FourCharCode code) { |
26 std::string result(6, '\''); | 25 std::string result(6, '\''); |
27 result[1] = (code >> 24) & 0xFF; | 26 result[1] = (code >> 24) & 0xFF; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 base::FundamentalValue value(b); | 256 base::FundamentalValue value(b); |
258 NSAppleEventDescriptor* descriptor = | 257 NSAppleEventDescriptor* descriptor = |
259 chrome::mac::ValueToAppleEventDescriptor(&value); | 258 chrome::mac::ValueToAppleEventDescriptor(&value); |
260 | 259 |
261 EXPECT_EQ(typeBoolean, [descriptor descriptorType]); | 260 EXPECT_EQ(typeBoolean, [descriptor descriptorType]); |
262 EXPECT_EQ(b, [descriptor booleanValue]); | 261 EXPECT_EQ(b, [descriptor booleanValue]); |
263 } | 262 } |
264 } | 263 } |
265 | 264 |
266 } // namespace | 265 } // namespace |
OLD | NEW |