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

Side by Side Diff: visual_studio/NativeClientVSAddIn/UnitTests/TestUtilities.cs

Issue 11266051: Add PNaCl support for VS addin. (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: fix nits and tests Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 namespace UnitTests 5 namespace UnitTests
6 { 6 {
7 using System; 7 using System;
8 using System.Collections.Generic; 8 using System.Collections.Generic;
9 using System.IO; 9 using System.IO;
10 using System.Linq; 10 using System.Linq;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 string newSolutionDir = Path.Combine(testContext.DeploymentDirectory, name ); 99 string newSolutionDir = Path.Combine(testContext.DeploymentDirectory, name );
100 string newSolution = Path.Combine(newSolutionDir, BlankSolution + ".sln"); 100 string newSolution = Path.Combine(newSolutionDir, BlankSolution + ".sln");
101 CopyDirectory(Path.Combine(testContext.DeploymentDirectory, BlankSolution) , newSolutionDir); 101 CopyDirectory(Path.Combine(testContext.DeploymentDirectory, BlankSolution) , newSolutionDir);
102 102
103 try 103 try
104 { 104 {
105 dte.Solution.Open(newSolution); 105 dte.Solution.Open(newSolution);
106 Project proj = dte.Solution.Projects.Item(BlankNaClProjectUniqueName); 106 Project proj = dte.Solution.Projects.Item(BlankNaClProjectUniqueName);
107 107
108 // Order matters if copying from the other Native Client type. 108 // Order matters if copying from the other Native Client type.
109 if (pepperCopyFrom.Equals(NativeClientVSAddIn.Strings.NaCl64PlatformName )) 109 if (pepperCopyFrom == NativeClientVSAddIn.Strings.NaCl64PlatformName)
110 { 110 {
111 proj.ConfigurationManager.AddPlatform( 111 proj.ConfigurationManager.AddPlatform(
112 NativeClientVSAddIn.Strings.NaCl64PlatformName, naclCopyFrom, true); 112 NativeClientVSAddIn.Strings.NaCl64PlatformName, naclCopyFrom, true);
113 proj.ConfigurationManager.AddPlatform( 113 proj.ConfigurationManager.AddPlatform(
114 NativeClientVSAddIn.Strings.PNaClPlatformName, naclCopyFrom, true);
115 proj.ConfigurationManager.AddPlatform(
114 NativeClientVSAddIn.Strings.PepperPlatformName, pepperCopyFrom, true ); 116 NativeClientVSAddIn.Strings.PepperPlatformName, pepperCopyFrom, true );
115 } 117 }
116 else 118 else
117 { 119 {
118 proj.ConfigurationManager.AddPlatform( 120 proj.ConfigurationManager.AddPlatform(
119 NativeClientVSAddIn.Strings.PepperPlatformName, pepperCopyFrom, true ); 121 NativeClientVSAddIn.Strings.PepperPlatformName, pepperCopyFrom, true );
120 proj.ConfigurationManager.AddPlatform( 122 proj.ConfigurationManager.AddPlatform(
121 NativeClientVSAddIn.Strings.NaCl64PlatformName, naclCopyFrom, true); 123 NativeClientVSAddIn.Strings.NaCl64PlatformName, naclCopyFrom, true);
124 proj.ConfigurationManager.AddPlatform(
125 NativeClientVSAddIn.Strings.PNaClPlatformName, naclCopyFrom, true);
122 } 126 }
123 127
124 // Set the active solution configuration to Debug|NaCl64. 128 // Set the active solution configuration to Debug|NaCl64.
125 SetSolutionConfiguration( 129 SetSolutionConfiguration(
126 dte, BlankNaClProjectUniqueName, "Debug", NativeClientVSAddIn.String s.NaCl64PlatformName); 130 dte, BlankNaClProjectUniqueName, "Debug", NativeClientVSAddIn.String s.NaCl64PlatformName);
127 131
128 proj.Save(); 132 proj.Save();
129 dte.Solution.SaveAs(newSolution); 133 dte.Solution.SaveAs(newSolution);
130 } 134 }
131 finally 135 finally
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 464 }
461 465
462 foreach (DirectoryInfo subdir in dir.GetDirectories()) 466 foreach (DirectoryInfo subdir in dir.GetDirectories())
463 { 467 {
464 string path = Path.Combine(dest, subdir.Name); 468 string path = Path.Combine(dest, subdir.Name);
465 CopyDirectory(subdir.FullName, path); 469 CopyDirectory(subdir.FullName, path);
466 } 470 }
467 } 471 }
468 } 472 }
469 } 473 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698