| 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/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" | 
| 18 #include "base/values.h" | 18 #include "base/values.h" | 
| 19 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 19 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 20 #include "testing/gtest_mac.h" | 20 #include "testing/gtest_mac.h" | 
| 21 | 21 | 
| 22 namespace { | 22 namespace { | 
| 23 | 23 | 
| 24 std::string FourCharToString(FourCharCode code) { | 24 std::string FourCharToString(FourCharCode code) { | 
| 25   std::string result(6, '\''); | 25   std::string result(6, '\''); | 
| 26   result[1] = (code >> 24) & 0xFF; | 26   result[1] = (code >> 24) & 0xFF; | 
| 27   result[2] = (code >> 16) & 0xFF; | 27   result[2] = (code >> 16) & 0xFF; | 
| 28   result[3] = (code >> 8) & 0xFF; | 28   result[3] = (code >> 8) & 0xFF; | 
| 29   result[4] = code & 0xFF; | 29   result[4] = code & 0xFF; | 
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 256     base::FundamentalValue value(b); | 256     base::FundamentalValue 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 | 
|---|